package com.turing.model.registry.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.turing.model.registry.model.domain.RegisterInstance;
import com.turing.model.registry.vo.RegisteredInstanceVO;

import java.util.List;

/**
* @Description $!{table.comment} 服务类接口
* @Author livin
* @Date 2022-01-24
*/
public interface RegisterInstanceService extends IService<RegisterInstance> {

    void registerOrRenew(RegisteredInstanceVO registeredInstanceVO);

    List<RegisterInstance> getExpiredInstances();

    void saveInstanceInfo(String host, String port, String type, String cardNo,Integer taskId, String templates);

    void removeInstanceInfo(String host, String port, String appType, String cardNo);

    Integer addJob(String host, String port, String type, String cardNo, String templates);

    void stopAndRemoveJob(String host, String port, String appType, String cardNo);

    void stopJob( Integer jobId );

    void startJob( Integer startJob );

    boolean instanceExist(String host, String port, String type, String cardNo);

}
